package service;

import dao.ClassGradeDao;
import entity.ClassGrade;
import factory.DaoFactory;

public class ClassGradeServiceImpl implements ClassGradeService {
    //自定义成员变量来记录班级数据的访问对象
    private ClassGradeDao classGradeDao;

    public ClassGradeServiceImpl(){
        classGradeDao = DaoFactory.getClassGradeDao();
    }

    /**
     * 自定义成员放发实现增加班级的功能
     * @param classGrade
     * @return
     */
    @Override
    public int classGradeAddService(ClassGrade classGrade) {
        return classGradeDao.classGradeAdd(classGrade);
    }

    /**
     * 自定义成员放发实现按照班级编号删除班级的功能
     * @param classIds
     * @return
     */
    @Override
    public int classGradeDeleteService(String[] classIds) {
        return classGradeDao.classGradeDelete(classIds);
    }

    /**
     * 自定义成员你方法实现班级修改的功能
     * @param classGrade
     * @return
     */
    @Override
    public int classGradeModifyService(ClassGrade classGrade) {
        return classGradeDao.classGradeModify(classGrade);
    }

    /**
     * 自定义成员方法实现根据编号查找班级的功能
     * @param classId
     * @return
     */
    @Override
    public ClassGrade classGradeFindService(int classId) {
        return classGradeDao.classGradeFind(classId);
    }
}
